package com.qczl.pme.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 短信
 * 
 * 什么时间发送什么给谁
 * @author SongR
 *
 */
@Entity
@Table(name="pme_basis_sms")
public class PMESMS implements Serializable{
	private static final long serialVersionUID = 8803290224761986757L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "sms_id")
	private Long id;//编号
	@Column(name = "sms_content")
	private String content;//短信内容
	@Column(name = "sms_sendtime")
	private Date sendTime;
	@Column(name = "sms_code")
	private String code;
	
	@Column(name = "sms_status")
	private Integer status;
	
	@ManyToOne(cascade = CascadeType.ALL,fetch=FetchType.EAGER)
	@JoinColumn(name = "person_id", referencedColumnName = "person_id",nullable=false)
	private PMEPerson person;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public PMEPerson getPerson() {
		return person;
	}

	public void setPerson(PMEPerson person) {
		this.person = person;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
}
